<%@ include file="/html/portlet/ext/registration/init.jsp" %>

<script type="text/javascript">

	function validate() {
	
		var employeeId = document.<portlet:namespace />fm.<portlet:namespace />employeeId;
		var collegePin = document.<portlet:namespace />fm.<portlet:namespace />collegePin;
		
		if(employeeId.value.length == 0) {
			alert("Please Enter EmployeeId Id");
			employeeId.focus()
			return false;
		}
		
		if(collegePin.value.length == 0) {
			alert("Please Enter College Pin");
			collegePin.focus()
			return false;
		}
		
		return true;
	}
</script>

<portlet:actionURL var="validStaffURL">
       <portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
       <portlet:param name="<%= Constants.CMD %>" value="validStaff" />                
</portlet:actionURL>

<liferay-ui:error exception="<%= SecretPinException.class %>" message="college-pin-not-exist" />
<liferay-ui:error exception="<%= DuplicateEmployeeIdException.class %>" message="duplicate-employee-id" />

<form action="<%= validStaffURL.toString() %>" method="POST" name="<portlet:namespace />fm">   
<center> 
	<fieldset class="block-labels col">
	<table width='100%' class='portlet-box' align='center' cellspacing="0" cellpadding="2">
		<tr class = "portlet-section-body results-row alt">
			<td>
				<b><liferay-ui:message key="employee-id" /></b><font color="red" style = "font-size: medium;">*</font>
			</td>
			<td>
				<input type= "text" name= "<portlet:namespace />employeeId" value="<%= ParamUtil.getString(request,"employeeId") %>">
			</td>
		</tr>
		<tr class = "portlet-section-body results-row">
			<td>
				 <b><liferay-ui:message key="college-pin" /></b><font color="red" style = "font-size: medium;">*</font> 
			</td>
			<td>
				<input type= "text" name= "<portlet:namespace />collegePin" value="<%= ParamUtil.getString(request,"collegePin") %>">
			</td>
		</tr>
		
	</table>  
	<br>
	<table align='center'>
		<tr class="portlet-form-button">	  
			<td colspan="2">
				 <input type="submit" value="<liferay-ui:message key="continue" />" onClick="return validate()"/>
				  <input type="button"  value='<liferay-ui:message key="cancel" />' onClick='history.go(-1)'>
			</td>
		</tr>
	</table> 
	</fieldset> 
  </center>
</form>
